const dbConnect=require("../utils/dbConnect");


const addInfo=async (data)=>{
    let _sql=`INSERT INTO session (start_time,end_time,all_num,time_id) VALUES (${data.startTimeStamp},${data.endTimeStamp},${data.allNumer},${data.timeId})`;
  
    try {
        return await dbConnect(_sql);
    } catch (error) {
        return error;
    }
}

const getInfo=async (data)=>{
    let _sql=`SELECT id,start_time,end_time,is_appointment FROM session WHERE time_id=${data.timeId} `;
    try {
        return await dbConnect(_sql);
    } catch (error) {
        return error;
    }
}


module.exports={addInfo,getInfo};